1. Field of the Invention
The present invention relates to image processing, and, in particular, to processes and apparatuses for characterizing and adjusting the spatial relationships between displayed objects.
2. Description of the Related Art
Window-based computer systems display visual output in windows on a display monitor. A given window may overlap with or even completely cover one or more other windows. In order to coordinate the display of multiple windows within the display raster of a display monitor, conventional computer systems characterize the spatial relationships between the various windows. Such characterizations may be used to determine whether two or more windows overlap and, if so, how they overlap.
Referring now to FIG. 1, there is depicted the seventeen different possible types of spatial relationships between two rectangular windows in a display raster. The thick-lined rectangle represents a particular window in the display raster. The seventeen thin-lined and dashed-lined rectangles represent seventeen other windows in the display raster that demonstrate the seventeen different types of spatial relationships that rectangular windows can have with the thick-lined window. Note that window 17 represent the general no-overlap condition.
Referring now to FIG. 2, there is shown a display raster 200 containing two overlapping rectangular windows W1 and W2. Conventional computer systems characterize the spatial relationship between windows by implementing sequences of comparisons between the coordinates of the windows and then basing the characterization upon the results of those comparisons. In order to determine the type of overlap that exists, a conventional computer system may independently compare each of the four coordinates L2, R2, T2, and B2 of window W2 of FIG. 2 to the two corresponding coordinates of window W1. For example, coordinate L2 of window W2 may be independently compared to coordinates L1 and R1 of window W1.
These independent comparisons may then be combined to determine the type of overlap that exists. For example, as depicted in FIG. 2, if:
(L1&lt;L2) AND (L2&lt;R1) AND PA0 (T1&lt;T2) AND (T2&lt;B1) AND PA0 (L1&lt;R2) AND (R2&gt;R1) AND PA0 (T1&lt;B2) AND (B2&gt;B1)
then overlap type 9 of FIG. 1 exists, where window W1 of FIG. 2 corresponds to the thick-lined window of FIG. 1 and window W2 corresponds to dashed-lined window 9.
Some conventional window-based computer systems are based on pipelined processors. Pipelined processors fetch and pre-process one or more subsequent instructions while the current instruction is executing. When the address of the next instruction is predetermined, this pipelining approach provides improved processor performance over a sequential approach in which the fetching and pre-processing of the next instruction does not begin until the execution unit completes the execution of the current instruction. In the sequential approach, the execution unit then idly waits while the next instruction is being fetched and pre-processed.
Conditional jumps disrupt pipelined processing. If the condition is met, then the address of the next instruction to be executed by the processor will not follow the current instruction. In that case, the current fetch and pre-process queue is flushed and the execution unit idly waits until the correct next instruction is fetched and pre-processed.
In a conventional window-based computer system, the characterization of the spatial relationship between two windows in a display raster is implemented as a sequence of comparisons between coordinates of the two windows with a conditional jump after each comparison. A single characterization of spatial relationship may involve several conditional jumps, each of which disrupts the pipelined processing and thereby reduces processor efficiency. In addition, conventional computer systems may repeat the same window coordinate comparisons in different combinations to characterize the spatial relationship between the same two windows. This also contributes to processor inefficiency.
What is needed is a window-based computer system with a pipelined processor that characterizes the spatial relationship between windows in a display raster without unnecessarily decreasing processor efficiency.
It is accordingly an object of this invention to overcome the limitations of the known art and to provide a window-based computer system that characterizes the spatial relationship between windows in a display raster without unnecessarily decreasing the efficiency of the pipelined processor.
It is a further object of this invention to provide improved processes and apparatuses for characterizing the type of overlap between two windows in a display raster.
It is a further object of this invention that the number of coordinate comparisons and the number of conditional jumps involved in characterizing window overlap be minimized.
It is a general object of this invention to provide processes and apparatuses for characterizing and adjusting the spatial relationship between displayed objects.
Further objects and advantages of this invention will become apparent from the detailed description of a preferred embodiment which follows.